![]() |
PATH![]() |
![]() ![]() |
You use the URL Access Manager to transfer data to and from a Universal Resource Locator (URL).
For download operations, the URL can be a File Transfer Protocol (FTP) URL (beginning with ftp:// ), a Hypertext Transfer Protocol (HTTP) URL (beginning with http:// ), a secure HTTP URL (beginning with https:// ), or a URL that represents a local file (beginning with file:/// ).
For upload operations, the URL must be an FTP URL.
The URL Access Manager provides high-level and low-level functions for downloading and uploading data. The high-level functions include URLSimpleDownload and URLSimpleUpload for downloading and uploading data synchronously. To use these functions, specify the URL as a character string. These functions are easy to use because they allow you to start a download or upload operation with a minimal amount of preparation or intervention.
The URLDownload and URLUpload functions also allow you to download and upload data synchronously. These functions differ from URLSimpleDownload and URLSimpleUpload in that you use a URL reference to specify the URL. Using a URL reference allows you to get and set information associated with a URL by calling the URLGetProperty and URLSetProperty functions.
The URLOpen function is the low-level URL Access Manager function. It allows you to download data from and upload data to a URL asynchronously. When you call URLOpen to download data, you must call URLGetBuffer to transfer data to your own buffers.
This chapter presents the following examples of using the URL Access Manager:
This chapter ends with a section on using AppleScript to call the URL Access Manager and a section on creating new URL Access Manager properties for a URL.